cd guldan-jaina
git pull
mvn clean package -Dmaven.test.skip=true -U -P dev
rm -rf /home/minsheng/deploy/jaina/guldan-jaina.jar
cp -rf target/guldan-jaina.jar /home/minsheng/deploy/jaina/
cp -rf target/lib/ /home/minsheng/deploy/jaina/

cd /home/minsheng/deploy/jaina/

NAME="guldan-jaina"
echo $NAME
ID=`ps -ef | grep "$NAME" | grep -v "$0" | grep -v "grep" | awk '{print $2}'`
echo $ID
echo "---------------"
for id in $ID
do
kill -9 $id
echo "killed $id"
done
echo "---------------"

java -Dproject.name=guldan-jaina -jar guldan-jaina.jar -server -Xms512m -Xmx512m -XX:MaxNewSize=512m -XX:PermSize=512M -XX:MaxPermSize=512m -XX:ThreadStackSize=512 -classpath .:lib >> /dev/null 2>&1 &